<?php
namespace app\admin\controller;

use think\Controller;
use think\Session;
use think\Db;

class Setting extends Controller
{
	public function _initialize()
    {
        if(!Session::has('Adminname')){
            $this->error('请登录!','../admin');
        }
        if(Session::get('Adminpower')!=1){
            $this->error('您没有访问权限!');
        }
    }
    public function index()
    {
    	$list = Db::name('user')->order('id','asc')->cache(true,10)->paginate(10);
    	$page = $list->render();
    	$this->assign('list', $list);
		$this->assign('page', $page);
        return $this->fetch();
    }
}
